<?php
$username="admin";
$password="P@assw0rd";
$database="infologik";

mysql_connect(localhost,$username,$password);
@mysql_select_db($database) or die(mysql_error());
$query="SELECT * FROM customer";
$result=mysql_query($query);

$num=mysql_numrows($result);

mysql_close();

echo "<b><center>Database Output</center></b><br><br>";

$i=0;
while ($i < $num) {

$customerCode=mysql_result($result,$i,"customerCode");
$firstname=mysql_result($result,$i,"firstname");
$lastname=mysql_result($result,$i,"lastname");
$email=mysql_result($result,$i,"email");
$siteCode=mysql_result($result,$i,"siteCode");
$dateCreate=mysql_result($result,$i,"dateCreate");
$dateUpdated=mysql_result($result,$i,"dateUpdated");

echo "<b> $customerCode </b> <b>$firstname $lastname</b><br>Email: $email<br>SiteCode: $siteCode<br>DateCreated: $dateCreate<br>DateUpdated: $dateUpdated<br><hr><br>";

$i++;
}

?>
